﻿<UserControl x:Class="DIST.LR.ZHJG.Pgybc.Zbgl_Tree"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
    xmlns:sampleData="clr-namespace:DIST.LR.ZHJG.Pgybc"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="250"
             >
    <UserControl.Resources>
        <DataTemplate x:Key="KPI">
            <TextBlock Text="{Binding KPIName}" FontSize="14" Foreground="Green" />
        </DataTemplate>
        <telerik:HierarchicalDataTemplate x:Key="KPIType" ItemTemplate="{StaticResource KPI}" ItemsSource="{Binding KPIs}">
            <TextBlock Text="{Binding Name}" FontSize="16" Foreground="Green"/>
        </telerik:HierarchicalDataTemplate>

        <SolidColorBrush Color="#d6d4d4" x:Key="BorderBrush"/>
        <Style TargetType="TextBlock" x:Key="TitleStyle">
            <Setter Property="Foreground" Value="#25a0da" />
            <Setter Property="FontSize" Value="23" />
            <Setter Property="FontFamily" Value="/Telerik.Windows.QuickStartUITheme;component/Fonts/MyriadPro-Light.otf#Myriad Pro Light" />
            <Setter Property="Margin" Value="10 5" />
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid Margin="10,5,0,5">
            <Grid.RowDefinitions>
                <RowDefinition Height="0.15*"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <Border Background="Transparent" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1 1 1 1">
                <TextBlock Text="指 标 概 览" Style="{StaticResource TitleStyle}"/>
            </Border>
            <Border Background="Transparent" BorderBrush="{StaticResource BorderBrush}" BorderThickness="1 0 1 1" Grid.Row="1">
                <telerik:RadTreeView x:Name="radTreeView" 
                                     Padding="5" 
                                     BorderThickness="0"
                                     ItemsSource="{Binding KPTypeDataSource}"
                                     ItemTemplate="{StaticResource KPIType}" 
                                     IsExpandOnSingleClickEnabled="True" 
                                     SelectionChanged="radTreeView_SelectionChanged" />
            </Border>
        </Grid>

    </Grid>
</UserControl>
